import { createStore, applyMiddleware, combineReducers, compose } from 'redux';
import thunk from 'redux-thunk';

import { test } from './modules/test';
import { userInfoTb } from './modules/userInfo';
import { chatUser } from './modules/chatuser';

const reduxDevtools = window.devToolsExtension ? window.devToolsExtension():f=>f;

const store = createStore(
    combineReducers({
        test: test,
        user: userInfoTb,
        chatUser
    }),
    compose(applyMiddleware(thunk), reduxDevtools)
);

export default store;